// 导入类型
import { LoginRequest, LoginResponse, reLoginRequest } from './types';
// post 请求直接传入一个 data 即可 url 我们直接在此处封装好
// 需要更改时也只需在此处更改
// 定义的后端接口
import service from '@/http/request';
//登录
export const userLogin = async (data?: LoginRequest) => {
    return service({ url: '/login', method: 'post', data });
};
export const refreshUserInfo = async (data?: reLoginRequest) => {
    return service({ url: '/getUserInfo', method: 'post', data });
};
//获取所有的用户
export const getUserList = async () => {
    return service({
        url: '/getUserList',
        method: 'get'
    });
};
